package com.zlc.common.model.resource;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zlc.common.util.tree.Node;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
public class ResourceEntity extends Node<ResourceEntity> {
    private static final long serialVersionUID = 0L;
    /**
     * 资源ID
     */
    @ApiModelProperty(value = "资源ID")
    private String resourceId;

    /**
     * 父资源ID
     */
    @ApiModelProperty(value = "父资源ID")
    private String parentResourceId;

    /**
     * 系统标识
     */
    @ApiModelProperty(value = "系统标识")
    private String systemCode;

    /**
     * 资源类别 WEB|APP
     */
    @ApiModelProperty(value = "资源类别 WEB|APP")
    private String resourceCategory;

    /**
     * 资源类型 MENU|GROUP|SUBMENU
     */
    @ApiModelProperty(value = "资源类型 MENU|GROUP|SUBMENU")
    private String resourceType;

    /**
     * 资源code
     */
    @ApiModelProperty(value = "资源code")
    private String resourceCode;

    /**
     * 资源名称
     */
    @ApiModelProperty(value = "资源名称")
    private String resourceName;

    /**
     * 半路径地址
     */
    @ApiModelProperty(value = "半路径地址")
    private String urlPath;

    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    private String icon;


    @ApiModelProperty(value = "是否是叶子节点资源")
    private String leafFlag;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer order;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;


    private String id;

    private Integer version;

    private String createUser;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(example = "2020-10-01 12:18:48")
    private Date createTime;

    private String updateUser;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(example = "2020-10-01 12:18:48")
    private Date updateTime;

    private Boolean deleteFlag = Boolean.FALSE;

    /**
     * 选中类型 CHECK 选中|PART 部分选中|NO 未选中
     */
    @ApiModelProperty(value = "选中类型 CHECK 选中|PART 部分选中|NO 未选中")
    private String checkType;

    /**
     * 是否禁用
     */
    private boolean disabled;

}
